//
// Created by Rory on 2020/10/28.
//
#define ElementType char
#define GENERATE_TEST_FUNC_SIGNATURE
#include "binarytree.h"

TestFunc(CreateInThreadTree){

    ThreadTree tree = {'a', NULL, NULL, false, false};
    ThreadNode B = {'b',NULL,NULL,false,false};
    ThreadNode C = {'c',NULL,NULL,false,false};
    ThreadNode D = {'d',NULL,NULL,false,false};
    ThreadNode E = {'e',NULL,NULL,false,false};
    ThreadNode F = {'f',NULL,NULL,false,false};
    ThreadNode G = {'g',NULL,NULL,false,false};

    tree.lchild = &B, tree.rchild = &C;
    B.lchild = &D, B.rchild = &E;
    C.lchild = &F, C.rchild = NULL;
    D.lchild = NULL, D.rchild = &G;
    E.lchild = NULL, E.rchild = NULL;
    F.lchild = NULL, F.rchild = NULL;
    G.lchild = NULL, G.rchild = NULL;

    CreateInThreadTree(&tree);
}

int main(){
   //InvokeFunc(CreateInThreadTree);

   int a = 66;

   printf("%d,%c\n",a,a);

   double b = 12.4678;
   printf("%f\n",b);
   printf("%.1f\n",b);

   int c,d;
   //scanf("%d,%d",&c,&d);
   printf("%d,%d\n",c,d);

   char* s = "abc";
   printf("%x\n",s);

   printf("sizeof(long double)%lu",sizeof(long double));
   printf("sizeof(double):%lu\n",sizeof(double));
   printf("sizeof(long):%lu\n",sizeof(long));
   printf("sizeof(long long):%lu\n",sizeof(long long));


   char *p1 = "a";
   char *p2 = "";
   char s3 = {'a','b'};
   printf("%p,%p,%c\n",p1,p2,s3);



   printf("%5d",2);
   return 0;
}